home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
util
/
boot
/
avwm.lzh
/
avwm-0.4
/
callbacks.h
< prev
next >
Wrap
C/C++ Source or Header
|
1994-08-08
|
892b
|
33 lines
/* callbacks.h */
#include <exec/lists.h>
#include <intuition/intuition.h>
#include <pragmas/intuition_pragmas.h>
#define EmptyMinList(x) (((x)->mlh_TailPred)==(struct MinNode *)(x))
#define AddCallback(win,fun,class) AddPortCallback((win)->UserPort,fun,class)
#define Malloc(x) (x *)malloc(sizeof(x))
typedef int (*callback) (struct IntuiMessage *msg, struct Callback *cb);
struct CbPort {
struct MinNode node;
struct MinList callbacks;
struct MsgPort *port;
ULONG sig;
};
struct Callback {
struct MinNode node;
callback function;
ULONG class;
struct CbPort* cbport;
};
void AppMainLoop (void);
struct Callback *AddPortCallback (struct MsgPort *port, callback fun, ULONG class);
void SetSignalCallback (ULONG signal_mask, callback fun);
void RemoveCallback (struct Callback *cb);
void RemoveAllCallbacks (void);
void InitListHeader (struct MinList *list);